package it.polimi.digitalstate.dto;


import java.sql.Date;

public class ElectionDTO implements IDataTransferObject{
		private Integer id;
		private String name="";
		private UserDTO governor;
		private Date candidacystartdate ;
		private Date candidacyenddate ;
		private Date electionstartdate ;
		private Date electionenddate ;
		
		public ElectionDTO(){
			super();
			
		}
		public ElectionDTO(String name, UserDTO governor, Date candidacystartdate, Date candidacyenddate, Date electionstartdate, Date electionenddate){
			this.name=name;
			this.governor = governor;
			this.candidacystartdate = candidacystartdate;
			this.candidacyenddate = candidacyenddate;
			this.electionstartdate = electionstartdate;
			this.electionenddate = electionenddate;
		}
		public ElectionDTO(int id,UserDTO governor,String name, Date candidacystartdate, Date candidacyenddate, Date electionstartdate, Date electionenddate){
			this(name,governor,candidacystartdate,candidacyenddate,electionstartdate,electionenddate);
			this.id=new Integer(id); //boxing
		}
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		
		public UserDTO getGovernor() {
			return this.governor;
		}

		public void setGovernor(UserDTO governor) {
			this.governor = governor;
		}
		
		public Date getCandidacystartdate() {
			return this.candidacystartdate;
		}
		
		public void setCandidacystartdate(Date Candidacystartdate) {
			this.candidacystartdate = Candidacystartdate;
		}   
		
		public Date getCandidacyenddate() {
			return this.candidacyenddate;
		}

		public void setCandidacyenddate(Date Candidacyenddate) {
			this.candidacyenddate = Candidacyenddate;
		}   
		public Date getElectionstartdate() {
			return this.electionstartdate;
		}

		public void setElectionstartdate(Date Electionstartdate) {
			this.electionstartdate = Electionstartdate;
		}   
		public Date getElectionenddate() {
			return this.electionenddate;
		}

		public void setElectionenddate(Date Electionenddate) {
			this.electionenddate = Electionenddate;
		}   
		@Override
		public int getID() {
			if(id==null){
				//throw an exception
			}
			return id.intValue();
		}
}
